#define _CRT_SECURE_NO_WARNINGS 1

#include<stdio.h>

int main() {
    int n = 0;
    scanf("%d", &n);

    int flag = 1;
    for (int i = 2; i * i <= n; i++) {
        if (n % i == 0) {
            flag = 0;
        }
    }
    if (n <= 1) {
        flag = 0;
    }
    if (flag) {
        printf("Yes\n");
    }
    else {
        printf("No\n");
    }
    return 0;
}